package com.nxk.modules.content.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nxk.modules.core.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Data
@TableName("con_link")
public class ConLink extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @Length(max = 64, message = "链接名称不能大于64位")
    @NotEmpty(message = "链接名称不能为空")
    private String linkName;

    @Length(max = 255, message = "链接地址不能大于255位")
    @NotEmpty(message = "链接地址不能为空")
    private String linkAddress;

    @Length(max = 255, message = "链接图标不能大于255位")
    @NotEmpty(message = "链接图标不能为空")
    private String linkIcon;

}
